public class Main {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
//        System.out.println(node.val);
//        binaryTree.preOrder(root);
//        System.out.println();
//        binaryTree.size(root);
//        System.out.println();
//        System.out.println(binaryTree.nodeSize);
        System.out.println("节点个数："+binaryTree.size2(root));
        binaryTree.getLeafNodeCount1(root);
        System.out.println("叶子节点个数："+binaryTree.leaf);
        System.out.println("叶子节点个数："+binaryTree.getLeafNodeCount2(root));
        System.out.println("第3层的节点个数："+binaryTree.getLevelNodeCount(root, 3));
        System.out.println("树的高度："+binaryTree.getHeight(root));
        binaryTree.find(root,'A');
    }
}